using System;
using System.Collections.Generic;
using System.Text;
using THSLib;using THSERP.BaseProvider;

namespace THSERP
{
    public class SaleOrderItemsEntity : ERPModuleItemsEntity
    {
        #region Variables
        protected int _aRSaleOrderItemID;
        protected String _aAStatus = DefaultAAStatus;
        protected int _fK_ARSaleOrderID;
        protected int _fK_ICDepartmentID;
        protected int _fK_ICProductGroupID;
        protected int _fK_ICProductID;
        protected int _fK_ICProductAttributeID;
        protected int _fK_ICStockID;
        protected int _fK_ICStockSlotID;
        protected String _aRSaleOrderItemProductType = String.Empty;
        protected String _aRSaleOrderItemProductSerialNo = String.Empty;
        protected String _aRSaleOrderItemProductAttribute = String.Empty;
        protected int _aRSaleOrderItemSortOrder;
        protected String _aRSaleOrderItemProductName = String.Empty;
        protected String _aRSaleOrderItemProductDesc = String.Empty;
        protected String _aRSaleOrderItemProductSellUnit = String.Empty;
        protected String _aRSaleOrderItemProductBasicUnit = String.Empty;
        protected String _aRSaleOrderItemProductPackagingUnit = String.Empty;
        protected double _aRSaleOrderItemProductSellFactor;
        protected double _aRSaleOrderItemProductPackagingFactor;
        protected double _aRSaleOrderItemProductUnitPrice;
        protected double _aRSaleOrderItemProductUnitCost;
        protected double _aRSaleOrderItemProductGroupDiscount;
        protected double _aRSaleOrderItemProductDiscount;
        protected double _aRSaleOrderItemProductTaxPercent;
        protected double _aRSaleOrderItemProductQtyOld;
        protected double _aRSaleOrderItemProductQty;
        protected double _aRSaleOrderItemProductBasicQty;
        protected double _aRSaleOrderItemProductPakagingQty;
        protected double _aRSaleOrderItemQty1;
        protected double _aRSaleOrderItemQty2;
        protected double _aRSaleOrderItemQty3;
        protected double _aRSaleOrderItemQty4;
        protected double _aRSaleOrderItemQty5;
        protected double _aRSaleOrderItemQty6;
        protected double _aRSaleOrderItemPrice;
        protected String _aRSaleOrderItemComment = String.Empty;
        protected double _aRSaleOrderItemUnitVolumn;
        protected double _aRSaleOrderItemUnitWeight;
        protected double _aRSaleOrderItemTaxAmount;
        protected double _aRSaleOrderItemDiscountAmount;
        protected double _aRSaleOrderItemNetAmount;
        protected double _aRSaleOrderItemTotalAmount;
        protected double _aRSaleOrderItemTotalCost;

        //Extra variables
        protected byte[] _aRSaleOrderItemProductPicture;
        #endregion

        #region Public properties
        public int ARSaleOrderItemID
        {
            get { return _aRSaleOrderItemID; }
            set
            {
                if (value != this._aRSaleOrderItemID)
                {
                    _aRSaleOrderItemID = value;
                    NotifyChanged("ARSaleOrderItemID");
                }
            }
        }
        public String AAStatus
        {
            get { return _aAStatus; }
            set
            {
                if (value != this._aAStatus)
                {
                    _aAStatus = value;
                    NotifyChanged("AAStatus");
                }
            }
        }
        public int FK_ARSaleOrderID
        {
            get { return _fK_ARSaleOrderID; }
            set
            {
                if (value != this._fK_ARSaleOrderID)
                {
                    _fK_ARSaleOrderID = value;
                    NotifyChanged("FK_ARSaleOrderID");
                }
            }
        }
        public int FK_ICDepartmentID
        {
            get { return _fK_ICDepartmentID; }
            set
            {
                if (value != this._fK_ICDepartmentID)
                {
                    _fK_ICDepartmentID = value;
                    NotifyChanged("FK_ICDepartmentID");
                }
            }
        }
        public int FK_ICProductGroupID
        {
            get { return _fK_ICProductGroupID; }
            set
            {
                if (value != this._fK_ICProductGroupID)
                {
                    _fK_ICProductGroupID = value;
                    NotifyChanged("FK_ICProductGroupID");
                }
            }
        }
        public int FK_ICProductID
        {
            get { return _fK_ICProductID; }
            set
            {
                if (value != this._fK_ICProductID)
                {
                    _fK_ICProductID = value;
                    NotifyChanged("FK_ICProductID");
                }
            }
        }
        public int FK_ICProductAttributeID
        {
            get { return _fK_ICProductAttributeID; }
            set
            {
                if (value != this._fK_ICProductAttributeID)
                {
                    _fK_ICProductAttributeID = value;
                    NotifyChanged("FK_ICProductAttributeID");
                }
            }
        }
        public int FK_ICStockID
        {
            get { return _fK_ICStockID; }
            set
            {
                if (value != this._fK_ICStockID)
                {
                    _fK_ICStockID = value;
                    NotifyChanged("FK_ICStockID");
                }
            }
        }
        public int FK_ICStockSlotID
        {
            get { return _fK_ICStockSlotID; }
            set
            {
                if (value != this._fK_ICStockSlotID)
                {
                    _fK_ICStockSlotID = value;
                    NotifyChanged("FK_ICStockSlotID");
                }
            }
        }
        public String ARSaleOrderItemProductType
        {
            get { return _aRSaleOrderItemProductType; }
            set
            {
                if (value != this._aRSaleOrderItemProductType)
                {
                    _aRSaleOrderItemProductType = value;
                    NotifyChanged("ARSaleOrderItemProductType");
                }
            }
        }
        public String ARSaleOrderItemProductSerialNo
        {
            get { return _aRSaleOrderItemProductSerialNo; }
            set
            {
                if (value != this._aRSaleOrderItemProductSerialNo)
                {
                    _aRSaleOrderItemProductSerialNo = value;
                    NotifyChanged("ARSaleOrderItemProductSerialNo");
                }
            }
        }
        public String ARSaleOrderItemProductAttribute
        {
            get { return _aRSaleOrderItemProductAttribute; }
            set
            {
                if (value != this._aRSaleOrderItemProductAttribute)
                {
                    _aRSaleOrderItemProductAttribute = value;
                    NotifyChanged("ARSaleOrderItemProductAttribute");
                }
            }
        }
        public int ARSaleOrderItemSortOrder
        {
            get { return _aRSaleOrderItemSortOrder; }
            set
            {
                if (value != this._aRSaleOrderItemSortOrder)
                {
                    _aRSaleOrderItemSortOrder = value;
                    NotifyChanged("ARSaleOrderItemSortOrder");
                }
            }
        }
        public String ARSaleOrderItemProductName
        {
            get { return _aRSaleOrderItemProductName; }
            set
            {
                if (value != this._aRSaleOrderItemProductName)
                {
                    _aRSaleOrderItemProductName = value;
                    NotifyChanged("ARSaleOrderItemProductName");
                }
            }
        }
        public String ARSaleOrderItemProductDesc
        {
            get { return _aRSaleOrderItemProductDesc; }
            set
            {
                if (value != this._aRSaleOrderItemProductDesc)
                {
                    _aRSaleOrderItemProductDesc = value;
                    NotifyChanged("ARSaleOrderItemProductDesc");
                }
            }
        }
        public String ARSaleOrderItemProductSellUnit
        {
            get { return _aRSaleOrderItemProductSellUnit; }
            set
            {
                if (value != this._aRSaleOrderItemProductSellUnit)
                {
                    _aRSaleOrderItemProductSellUnit = value;
                    NotifyChanged("ARSaleOrderItemProductSellUnit");
                }
            }
        }
        public String ARSaleOrderItemProductBasicUnit
        {
            get { return _aRSaleOrderItemProductBasicUnit; }
            set
            {
                if (value != this._aRSaleOrderItemProductBasicUnit)
                {
                    _aRSaleOrderItemProductBasicUnit = value;
                    NotifyChanged("ARSaleOrderItemProductBasicUnit");
                }
            }
        }
        public String ARSaleOrderItemProductPackagingUnit
        {
            get { return _aRSaleOrderItemProductPackagingUnit; }
            set
            {
                if (value != this._aRSaleOrderItemProductPackagingUnit)
                {
                    _aRSaleOrderItemProductPackagingUnit = value;
                    NotifyChanged("ARSaleOrderItemProductPackagingUnit");
                }
            }
        }
        public double ARSaleOrderItemProductSellFactor
        {
            get { return _aRSaleOrderItemProductSellFactor; }
            set
            {
                if (value != this._aRSaleOrderItemProductSellFactor)
                {
                    _aRSaleOrderItemProductSellFactor = value;
                    NotifyChanged("ARSaleOrderItemProductSellFactor");
                }
            }
        }
        public double ARSaleOrderItemProductPackagingFactor
        {
            get { return _aRSaleOrderItemProductPackagingFactor; }
            set
            {
                if (value != this._aRSaleOrderItemProductPackagingFactor)
                {
                    _aRSaleOrderItemProductPackagingFactor = value;
                    NotifyChanged("ARSaleOrderItemProductPackagingFactor");
                }
            }
        }
        public double ARSaleOrderItemProductUnitPrice
        {
            get { return _aRSaleOrderItemProductUnitPrice; }
            set
            {
                if (value != this._aRSaleOrderItemProductUnitPrice)
                {
                    _aRSaleOrderItemProductUnitPrice = value;
                    NotifyChanged("ARSaleOrderItemProductUnitPrice");
                }
            }
        }
        public double ARSaleOrderItemProductUnitCost
        {
            get { return _aRSaleOrderItemProductUnitCost; }
            set
            {
                if (value != this._aRSaleOrderItemProductUnitCost)
                {
                    _aRSaleOrderItemProductUnitCost = value;
                    NotifyChanged("ARSaleOrderItemProductUnitCost");
                }
            }
        }
        public double ARSaleOrderItemProductGroupDiscount
        {
            get { return _aRSaleOrderItemProductGroupDiscount; }
            set
            {
                if (value != this._aRSaleOrderItemProductGroupDiscount)
                {
                    _aRSaleOrderItemProductGroupDiscount = value;
                    NotifyChanged("ARSaleOrderItemProductGroupDiscount");
                }
            }
        }
        public double ARSaleOrderItemProductDiscount
        {
            get { return _aRSaleOrderItemProductDiscount; }
            set
            {
                if (value != this._aRSaleOrderItemProductDiscount)
                {
                    _aRSaleOrderItemProductDiscount = value;
                    NotifyChanged("ARSaleOrderItemProductDiscount");
                }
            }
        }
        public double ARSaleOrderItemProductTaxPercent
        {
            get { return _aRSaleOrderItemProductTaxPercent; }
            set
            {
                if (value != this._aRSaleOrderItemProductTaxPercent)
                {
                    _aRSaleOrderItemProductTaxPercent = value;
                    NotifyChanged("ARSaleOrderItemProductTaxPercent");
                }
            }
        }
        public double ARSaleOrderItemProductQtyOld
        {
            get { return _aRSaleOrderItemProductQtyOld; }
            set
            {
                if (value != this._aRSaleOrderItemProductQtyOld)
                {
                    _aRSaleOrderItemProductQtyOld = value;
                    NotifyChanged("ARSaleOrderItemProductQtyOld");
                }
            }
        }
        public double ARSaleOrderItemProductQty
        {
            get { return _aRSaleOrderItemProductQty; }
            set
            {
                if (value != this._aRSaleOrderItemProductQty)
                {
                    _aRSaleOrderItemProductQty = value;
                    NotifyChanged("ARSaleOrderItemProductQty");
                }
            }
        }
        public double ARSaleOrderItemProductBasicQty
        {
            get { return _aRSaleOrderItemProductBasicQty; }
            set
            {
                if (value != this._aRSaleOrderItemProductBasicQty)
                {
                    _aRSaleOrderItemProductBasicQty = value;
                    NotifyChanged("ARSaleOrderItemProductBasicQty");
                }
            }
        }
        public double ARSaleOrderItemProductPakagingQty
        {
            get { return _aRSaleOrderItemProductPakagingQty; }
            set
            {
                if (value != this._aRSaleOrderItemProductPakagingQty)
                {
                    _aRSaleOrderItemProductPakagingQty = value;
                    NotifyChanged("ARSaleOrderItemProductPakagingQty");
                }
            }
        }
        public double ARSaleOrderItemQty1
        {
            get { return _aRSaleOrderItemQty1; }
            set
            {
                if (value != this._aRSaleOrderItemQty1)
                {
                    _aRSaleOrderItemQty1 = value;
                    NotifyChanged("ARSaleOrderItemQty1");
                }
            }
        }
        public double ARSaleOrderItemQty2
        {
            get { return _aRSaleOrderItemQty2; }
            set
            {
                if (value != this._aRSaleOrderItemQty2)
                {
                    _aRSaleOrderItemQty2 = value;
                    NotifyChanged("ARSaleOrderItemQty2");
                }
            }
        }
        public double ARSaleOrderItemQty3
        {
            get { return _aRSaleOrderItemQty3; }
            set
            {
                if (value != this._aRSaleOrderItemQty3)
                {
                    _aRSaleOrderItemQty3 = value;
                    NotifyChanged("ARSaleOrderItemQty3");
                }
            }
        }
        public double ARSaleOrderItemQty4
        {
            get { return _aRSaleOrderItemQty4; }
            set
            {
                if (value != this._aRSaleOrderItemQty4)
                {
                    _aRSaleOrderItemQty4 = value;
                    NotifyChanged("ARSaleOrderItemQty4");
                }
            }
        }
        public double ARSaleOrderItemQty5
        {
            get { return _aRSaleOrderItemQty5; }
            set
            {
                if (value != this._aRSaleOrderItemQty5)
                {
                    _aRSaleOrderItemQty5 = value;
                    NotifyChanged("ARSaleOrderItemQty5");
                }
            }
        }
        public double ARSaleOrderItemQty6
        {
            get { return _aRSaleOrderItemQty6; }
            set
            {
                if (value != this._aRSaleOrderItemQty6)
                {
                    _aRSaleOrderItemQty6 = value;
                    NotifyChanged("ARSaleOrderItemQty6");
                }
            }
        }
        public double ARSaleOrderItemPrice
        {
            get { return _aRSaleOrderItemPrice; }
            set
            {
                if (value != this._aRSaleOrderItemPrice)
                {
                    _aRSaleOrderItemPrice = value;
                    NotifyChanged("ARSaleOrderItemPrice");
                }
            }
        }
        public String ARSaleOrderItemComment
        {
            get { return _aRSaleOrderItemComment; }
            set
            {
                if (value != this._aRSaleOrderItemComment)
                {
                    _aRSaleOrderItemComment = value;
                    NotifyChanged("ARSaleOrderItemComment");
                }
            }
        }
        public double ARSaleOrderItemUnitVolumn
        {
            get { return _aRSaleOrderItemUnitVolumn; }
            set
            {
                if (value != this._aRSaleOrderItemUnitVolumn)
                {
                    _aRSaleOrderItemUnitVolumn = value;
                    NotifyChanged("ARSaleOrderItemUnitVolumn");
                }
            }
        }
        public double ARSaleOrderItemUnitWeight
        {
            get { return _aRSaleOrderItemUnitWeight; }
            set
            {
                if (value != this._aRSaleOrderItemUnitWeight)
                {
                    _aRSaleOrderItemUnitWeight = value;
                    NotifyChanged("ARSaleOrderItemUnitWeight");
                }
            }
        }
        public double ARSaleOrderItemTaxAmount
        {
            get { return _aRSaleOrderItemTaxAmount; }
            set
            {
                if (value != this._aRSaleOrderItemTaxAmount)
                {
                    _aRSaleOrderItemTaxAmount = value;
                    NotifyChanged("ARSaleOrderItemTaxAmount");
                }
            }
        }
        public double ARSaleOrderItemDiscountAmount
        {
            get { return _aRSaleOrderItemDiscountAmount; }
            set
            {
                if (value != this._aRSaleOrderItemDiscountAmount)
                {
                    _aRSaleOrderItemDiscountAmount = value;
                    NotifyChanged("ARSaleOrderItemDiscountAmount");
                }
            }
        }
        public double ARSaleOrderItemNetAmount
        {
            get { return _aRSaleOrderItemNetAmount; }
            set
            {
                if (value != this._aRSaleOrderItemNetAmount)
                {
                    _aRSaleOrderItemNetAmount = value;
                    NotifyChanged("ARSaleOrderItemNetAmount");
                }
            }
        }
        public double ARSaleOrderItemTotalAmount
        {
            get { return _aRSaleOrderItemTotalAmount; }
            set
            {
                if (value != this._aRSaleOrderItemTotalAmount)
                {
                    _aRSaleOrderItemTotalAmount = value;
                    NotifyChanged("ARSaleOrderItemTotalAmount");
                }
            }
        }
        public double ARSaleOrderItemTotalCost
        {
            get { return _aRSaleOrderItemTotalCost; }
            set
            {
                if (value != this._aRSaleOrderItemTotalCost)
                {
                    _aRSaleOrderItemTotalCost = value;
                    NotifyChanged("ARSaleOrderItemTotalCost");
                }
            }
        }

        //Extra properties
        public byte[] ARSaleOrderItemProductPicture
        {
            get
            {
                return _aRSaleOrderItemProductPicture;
            }
            set
            {
                _aRSaleOrderItemProductPicture = value;
            }
        }
        #endregion
    }
}
